<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv=Content-Type content="text/html;charset=utf-8" />
        <title>{$title} - {$settings.shopname}</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="format-detection" content="telephone=no">
        <link href="{$docroot}static/css/wshop_main_style.css?v={$cssversion}" type="text/css" rel="Stylesheet" />
        <link href="{$docroot}static/css/common.css?v={$cssversion}" type="text/css" rel="Stylesheet" />
        <script type="text/javascript" src="{$docroot}static/script/jquery-2.1.1.min.js?v={$cssversion}"></script>
        <script type="text/javascript" src="{$docroot}static/script/main.js?v={$cssversion}"></script>
    </head>
    <body>
        <input type="hidden" value="{$comid}" id="comid" />
        <input type="hidden" value="{$productInfo.product_name}" id="sharetitle" />
        <input type="hidden" value="{$productid}" id="iproductId" />
        <input type="hidden" value="{$shareimg}" id="shareimg" />
        <div id="slider" {if $catimage_height}style="height:{$catimage_height}px"{/if}>{strip}
                {if $images|@count > 1}
                    <div class="sliderTip">
                        {section name=ii loop=$images}
                            <i class="sliderTipItems {if $smarty.section.ii.index == 0}current{/if}"></i>
                        {/section}
                    </div>
                {/if}
                {section name=ii loop=$images}<div class="sliderX" {if $catimage_height}style="height:{$catimage_height}px"{/if}><img src="{$docroot}static/product_hpic/{$images[ii].image_path}" /></div>{/section}
            {/strip}
        </div>
        <div id="container">
            <title class="vpd-title" style='height:auto;'>{$productInfo.product_name}</title>
            <p class="vpd-subtitle">{$productInfo2.product_subtitle}</p>
            {if $productInfo.sale_prices ne '0.00'}
                <div class="pd-dsc">
                    <b>售价：</b>
                    <i class="prices">&yen;{$productInfo.sale_prices}</i>
                </div>
            {/if}
            <div class="pd-dsc" style="padding-top: 10px;">
                <b class="left">数量：</b>
                <div class="productCount clearfix">
                    <a class="btn" id="productCountMinus" href='javascript:;'></a>
                    <span id="productCountNum"><input type='tel' value='1' id="productCountNumi" /></span>
                    <a class="btn" id="productCountPlus" href='javascript:;'></a>
                </div>
            </div>
        </div>
        <div id="buybutton1" class="clearfix">
            <a class="button" id="addcart-button" href="javascript:;" onclick="addToCart();">加入购物车</a>
            <a class="button" id="buy-button" href="javascript:;" onclick="addToCart();
                    location = 'wxpay.php';">立即购买</a>
        </div>
        {if $productInfo2.product_desc ne ''}<div id="content">{$productInfo2.product_desc}</div>{/if}
        <div id="pd-recoment">
            <header>你可能会喜欢：</header>
            <div class='pd-box clearfix'>
                {foreach from=$slist item=sl}
                    <a class="slist-item" data-href="{$docroot}?/vProduct/view/id={$sl.product_id}">
                        <div class='pd-box-inner'>
                            <img src="{$docroot}static/product_hpic/{$sl.catimg}" />
                            <p>{$sl.product_name}</p>
                            {if $sl.sale_prices ne '0.00'}
                                <span class="prices">&yen;{$sl.sale_prices}</span>
                            {/if}
                        </div>
                    </a>
                {/foreach}
            </div>
        </div>
        {include file="../global/footer.tpl"}
        <script type="text/javascript">
            WeixinJSBridgeReady(viewproductOnload);
        </script>
    </body>
</html>